/*
 * @Author: 
 * @Date: 2022-01-27 10:30:21
 * @LastEditors: lqj
 * @LastEditTime: 2022-02-10 14:46:48
 * @Description: 消息发布订阅pubSub， router6.x使用useNavigate获取state
 */
import React, { Component } from 'react';
import Search from './components/Search'
import List from './components/List'
// import {nanoid} from 'nanoid'
// import PubSub from 'pubsub-js'

// import { useSearchParams, useNavigate } from 'react-router-dom'
// export default function GithubSearch() {
//   const [params] = useSearchParams()
//   let myId = params.getAll('id')[0]
  
//   const navigate = useNavigate()
//   const goHomePage = () => {
//     navigate('/about', {
//       state: { type: 789 }
//     })
//   }
//   return (
//     <div className='container'>
//       <button onClick={goHomePage}>Go About</button>
//       <Search />
//       <List />
//     </div>
//   );
// }

class GithubSearch extends Component {
  render() {
    return (
      <div className='container'>
        <Search />
        <List />
      </div>
    );
  }
}

export default GithubSearch;
